import {HTTP} from '../../utils/http';

class TeacherModel extends HTTP{

    constructor() {
        super()
    }



    /**
     * 获取教师详情
     * @param tId
     * @returns {*|Promise|Promise<any>}
     */
    getTeacherDetail(tId){

        return this.request({
            url: "HomePage/get_teacher_details",
            data:{
                "t_id": tId
            }
        })
    }


    /**
     * 获取相似教师
     * @param tId
     * @param current
     * @param pageSize
     * @returns {*|Promise|Promise<any>}
     */
    getRecommendTeacher(tId,current,pageSize){
        return this.request({
            url: "HomePage/recommend_teacher_list",
            data:{
                "t_id": tId,
                "page": current,
                "pagesize": pageSize
            }
        })
    }

    /**
     * 获取教师所教课程
     * @param tId
     * @param current
     * @param pageSize
     * @returns {*|Promise|Promise<any>}
     */
    getTeacherSubject(tId,current,pageSize){

        return this.request({
            url: "HomePage/get_teacher_course",
            data:{
                "t_id": tId,
                "page": current,
                "pagesize": pageSize
            }
        })
    }


}
export {TeacherModel}